<script>
document.write("<table border='1'>");
  for(var i=1;i<10;i++){
    document.write("<tr>");
 document.write("<td>");
 document.write(i);
 document.write("</td>");

 document.write("</tr>");
}
document.write("</table>");
</script>